feat(snap-account-service): add handleKeyringSnapMessage#8758
Conversation
handleKeyringSnapMessage
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 92068a5. Configure here.
| export type SnapAccountServiceHandleKeyringSnapMessageAction = { | ||
| type: `SnapAccountService:handleKeyringSnapMessage`; | ||
| handler: SnapAccountService['handleKeyringSnapMessage']; | ||
| }; |
There was a problem hiding this comment.
New action type not exported from package index
Medium Severity
SnapAccountServiceHandleKeyringSnapMessageAction is defined and added to the SnapAccountServiceActions union (which is exported), but the individual type itself is not re-exported from index.ts. The existing SnapAccountServiceEnsureReadyAction and SnapAccountServiceGetSnapsAction types are both exported individually, so this is inconsistent and prevents consumers from importing the new action type by name.
Triggered by project rule: Guidance for Bugbot
Reviewed by Cursor Bugbot for commit 92068a5. Configure here.


Explanation
Add
handleKeyringSnapMessage, so consumers can re-route those messages automatically through the service.For now we use the legacy Snap keyring, but once Snap keyring v2 are migrated, we would re-route those message to the proper v2 keyring.
References
N/A
Checklist
Note
Medium Risk
Adds a new messenger-exposed entry point that forwards arbitrary Snap messages into the legacy Snap keyring; misrouting or unexpected message shapes could affect Snap account/keyring operations.
Overview
Adds
SnapAccountService.handleKeyringSnapMessageand exposes it as a new messenger action (SnapAccountService:handleKeyringSnapMessage) so consumers can route keyring Snap messages through the service instead of directly using the legacy Snap keyring.Updates generated action type unions and adds targeted tests verifying forwarding behavior, error propagation, and messenger wiring; also documents the new API in the package changelog.
Reviewed by Cursor Bugbot for commit 92068a5. Bugbot is set up for automated code reviews on this repo. Configure here.